/***********************************************************************************/
/*    FILE: pi_datatypes.h      AUTHOR: John Sirett (johnsirett3@googlemail.com)
/*    -------------------------------------------------------------
/*    LAYER 0:    Platform Independence Layer
/*    IMPORTANCE: CRITICAL
/*
/*    Platform-indepdent datatypes of set bit-width; typedef'd to most efficent basic
/*    datatype available on the platform in question.
/*
/***********************************************************************************/
#ifndef _PI_DATATYPES_H
#define _PI_DATATYPES_H

#ifdef _WIN32
// Windows-specfic types
#include <windows.h>
#include <xmmintrin.h> // Needed for SIMD types.
typedef __int8 I8;
typedef __int16 I16;
typedef __int32 I32;
typedef __int64 I64;
typedef unsigned __int8 U8;
typedef unsigned __int16 U16;
typedef unsigned __int32 U32;
typedef unsigned __int64 U64;
typedef float F32;
typedef double F64;
typedef __m128 VF128;
#else
// Assume use of standard POSIX-style C libary (this code should work on both ICC and GCC)
#include <stdint.h>
typedef int8_t I8;
typedef int16_t I16;
typedef int32_t I32;
typedef int64_t I64;
typedef unsigned int8_t I8;
typedef unsigned int16_t I16;
typedef unsigned int32_t I32;
typedef unsigned int64_t I64;
typedef float F32;
typedef double F64;
#ifdef __SSE__
#include <xmmintrin.h> // Yes, ICC/GCC has equivlent SIMD support! :)
typedef __m128 VF128;
#else
#error "This program must be compiled on a system with SSE support."
#endif
};
#endif

#endif // _PI_DATATYPES_H